]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensions-app: Enable/disable an extension by activating the row
authorRomain Vigier <romain@romainvigier.fr>
Tue, 18 Jan 2022 12:04:55 +0000 (13:04 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sat, 12 Feb 2022 14:51:30 +0000 (14:51 +0000)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2114>

subprojects/extensions-app/data/ui/extension-row.ui
subprojects/extensions-app/js/main.js

index 608e360aa048cfc6d5f56be94638094ba5bca94f..37acb68d37f94678982f66d85bb47f4437354d1b 100644 (file)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <template class="ExtensionRow" parent="GtkListBoxRow">
-    <property name="activatable">false</property>
     <style>
       <class name="extension"/>
     </style>
index 15f881d17ac91e8299c9c555b59d8aca6b0e57f4..6ff8bb12e23e715389ab424eecc6a31190b2fac6 100644 (file)
@@ -134,6 +134,7 @@ var ExtensionsWindow = GObject.registerClass({
             margin_top: 12,
             margin_bottom: 12,
         }));
+        this._userList.connect('row-activated', (_list, row) => row.activate());
 
         this._systemList.set_sort_func(this._sortList.bind(this));
         this._systemList.set_filter_func(this._filterList.bind(this));
@@ -144,6 +145,7 @@ var ExtensionsWindow = GObject.registerClass({
             margin_top: 12,
             margin_bottom: 12,
         }));
+        this._systemList.connect('row-activated', (_list, row) => row.activate());
 
         this._shellProxy.connectSignal('ExtensionStateChanged',
             this._onExtensionStateChanged.bind(this));
@@ -425,6 +427,10 @@ var ExtensionRow = GObject.registerClass({
         this._updateState();
     }
 
+    vfunc_activate() {
+        this._switch.mnemonic_activate(false);
+    }
+
     get uuid() {
         return this._extension.uuid;
     }